package com.forest.service;

import com.forest.util.Sm4Util;

/**
 * sm4 加密实现
 * @author Administrator
 */
public class Sm4EncryptionImpl implements IEncryption {
    @Override
    public String encryptBase64(String data) {
        return Sm4Util.encryptBase64(data);
    }

    @Override
    public String encryptBase64(String data, String key) {
        return Sm4Util.encryptBase64(data, key);
    }

    @Override
    public String encryptBase64(String data, String key, String iv) {
        return Sm4Util.encryptBase64(data, key, iv);
    }

    @Override
    public String encryptBase64(String data, String key, String iv, boolean wrap) {
        return Sm4Util.encryptBase64(data, key, iv, wrap);
    }

    @Override
    public String encryptHex(String data) {
        return Sm4Util.encryptHex(data);
    }

    @Override
    public String encryptHex(String data, String key) {
        return Sm4Util.encryptHex(data, key);
    }

    @Override
    public String encryptHex(String data, String key, String iv) {
        return Sm4Util.encryptHex(data, key, iv);
    }

    @Override
    public String encryptHex(String data, String key, String iv, boolean wrap) {
        return Sm4Util.encryptHex(data, key, iv, wrap);
    }

    @Override
    public String decrypt(String data) {
        return Sm4Util.decrypt(data);
    }

    @Override
    public String decrypt(String data, String key) {
        return Sm4Util.decrypt(data, key);
    }

    @Override
    public String decrypt(String data, String key, String iv) {
        return Sm4Util.decrypt(data, key, iv);
    }

    @Override
    public String decrypt(String data, String key, String iv, boolean wrap) {
        return Sm4Util.decrypt(data, key, iv, wrap);
    }
}
